public class AudioPlayer {
    private MediaAdapter adapter = null;

    public void play(String audioType,String fileName){
        if(audioType.equalsIgnoreCase("mp3")){
           System.out.printf("正在播放%s.mp3%n",fileName);
        }else if(audioType.equalsIgnoreCase("vlc")||audioType.equalsIgnoreCase("mp4")){
            adapter =new MediaAdapter(audioType);
            adapter.play(audioType,fileName);
        }else{
            System.out.printf("不支持播放%s的文件",audioType);
        }
    }
    public void stop(String filename){
        System.out.printf("%s音乐已暂停%n",filename);
    }

}
